#pragma once
#include <windows.h>
#include "engine.h"

struct UIConfig {
    int panelWidth = 240;
    int margin = 10;
};

struct Layout {
    int cellW;
    int cellH;
    RECT gridRect;
    RECT panelRect;
};

class UI {
    UIConfig cfg;
public:
    Layout computeLayout(HWND hWnd, const Engine& eng) const;
    void draw(HWND hWnd, HDC hdc, const Engine& eng) const;
    bool pointToCell(const Layout& ly, POINT pt, const Engine& eng, Pos& out) const;
};

